home *** CD-ROM | disk | FTP | other *** search
- Path: fido.asd.sgi.com!austern
- From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
- Newsgroups: comp.std.c++
- Subject: Re: Why no allocator-specific delete?
- Date: 23 Jan 1996 10:20:04 PST
- Organization: Computer Science, University of Melbourne, Australia
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <9601231054.7277@mulga.cs.mu.OZ.AU>
- References: <4dvid8$460@news.bridge.net> <4e0u1s$5fv@engnews1.Eng.Sun.COM> <4e1jfb$1ea@fsgm01.fnal.gov>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: Tue, 23 Jan 1996 21:54:33 +1100
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMQUm8Uy4NqrwXLNJAQGXIAH/eMq40vjfymELO5eO9QqXpezCxDUA4Upz
- vzhDedmP0yOAA84lgYZ4HHkidH461Tl3Md208+ZHJKMmdKVHyHs0Xg==
- =IkYj
- Originator: austern@isolde.mti.sgi.com
-
- b91926@fsgm01.fnal.gov (David Sachs) writes:
-
- >One form for placement operator delete, that might avoid ambiguity is:
- >
- >delete (placement parameters) (pointer)
- >
- >The extra parentheses around the pointer would make this not a
- >syntactically correct non-placement delete.
-
- Nope, that won't help. Consider the following code:
-
- operator delete (void *, void (*)(int *));
- void f(int *);
- int *p;
- // ...
- delete (f) (p);
-
- Should this be a call to placement delete, or should
- it be equivalent to
-
- delete f(p);
-
- ?
-
- The ambiguity problems could have been resolved by using a
- syntax such as `delete {placement parameters} pointer'.
-
- --
- Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
- fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
- is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
-